package com.ruoyi.driver.service.impl;

import com.ruoyi.driver.domain.DvCar;
import com.ruoyi.driver.mapper.DvCarMapper;
import com.ruoyi.driver.service.IDvCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 车辆Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-03
 */
@Service
public class DvCarServiceImpl implements IDvCarService 
{
    @Autowired
    private DvCarMapper dvCarMapper;

    /**
     * 查询车辆
     * 
     * @param id 车辆主键
     * @return 车辆
     */
    @Override
    public DvCar selectDvCarById(Long id)
    {
        return dvCarMapper.selectDvCarById(id);
    }

    /**
     * 查询车辆列表
     * 
     * @param dvCar 车辆
     * @return 车辆
     */
    @Override
    public List<DvCar> selectDvCarList(DvCar dvCar)
    {
        return dvCarMapper.selectDvCarList(dvCar);
    }

    /**
     * 新增车辆
     * 
     * @param dvCar 车辆
     * @return 结果
     */
    @Override
    public int insertDvCar(DvCar dvCar)
    {
        return dvCarMapper.insertDvCar(dvCar);
    }

    /**
     * 修改车辆
     * 
     * @param dvCar 车辆
     * @return 结果
     */
    @Override
    public int updateDvCar(DvCar dvCar)
    {
        return dvCarMapper.updateDvCar(dvCar);
    }

    /**
     * 批量删除车辆
     * 
     * @param ids 需要删除的车辆主键
     * @return 结果
     */
    @Override
    public int deleteDvCarByIds(Long[] ids)
    {
        return dvCarMapper.deleteDvCarByIds(ids);
    }

    /**
     * 删除车辆信息
     * 
     * @param id 车辆主键
     * @return 结果
     */
    @Override
    public int deleteDvCarById(Long id)
    {
        return dvCarMapper.deleteDvCarById(id);
    }
}
